package jmvm.schemes;

import java.awt.Point;
import java.util.ArrayList;

import jmvm.components.*;
import jmvm.gui.GuiLine;
import jmvm.gui.GuiScheme;


public class Fetch3 {
	
	public static OR OR_gropr;
	public static OR OR_gradr;
	public static AND AND_gradr;
	public static OR OR_l1;
	public static OR OR_l2_brnch;
	public static OR OR_l3_jump;
	public static OR OR_store;
	public static OR OR_l2_arlog1;
	public static OR OR_l2_arlog2;
	public static AND AND_l2_arlog;
	public static OR OR_l3_arlog;
	public static AND AND_l3_arlog;

	public static NOT not_gropr, not_gradr;
	
	////////////
	//////////// Grafika
	////////////
	
	public static GuiScheme gui;

	public static GuiScheme getGui() {
		return gui;
	}
	
	public static void gui() {

		GuiLine line; // Pomocna promenljiva
		gui = new GuiScheme("jmvm/jmvm/images/fetch3.png");
		
		ArrayList<ArrayList<Point>> sections;
		ArrayList<Point> points;
		
		// 
		// 
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(77,28));
		points.add(new Point(84,28));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.G3());
		gui.addLine(line);

		// 
		// 
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(77,28+17));
		points.add(new Point(84,28+17));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.G2());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(77,28+17+17));
		points.add(new Point(84,28+17+17));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.G1());
		gui.addLine(line);
		
		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(77,28+17+17+17));
		points.add(new Point(84,28+17+17+17));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.G0_PG5_7());
		gui.addLine(line);
		
		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(77,28+17+17+17+18));
		points.add(new Point(84,28+17+17+17+18));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.G0_PG5_6());
		gui.addLine(line);
		
		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(77,28+17+17+17+17+19));
		points.add(new Point(84,28+17+17+17+17+19));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.G0_PG1_7());
		gui.addLine(line);
		
		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(77,28+17+17+17+17+17+19));
		points.add(new Point(84,28+17+17+17+17+17+19));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.G0_PG1_6());
		gui.addLine(line);
		
		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(77,28+17+17+17+17+17+17+20));
		points.add(new Point(84,28+17+17+17+17+17+17+20));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.G0_PG1_0());
		gui.addLine(line);
		
		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(77,28+17+17+17+17+17+17+17+20));
		points.add(new Point(84,28+17+17+17+17+17+17+17+20));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.G0_PG0_3());
		gui.addLine(line);
		
		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(77,28+17+17+17+17+17+17+17+17+20));
		points.add(new Point(84,28+17+17+17+17+17+17+17+17+20));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.G0_PG0_2());
		gui.addLine(line);
		
		// 
		// 
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(111,107));
		points.add(new Point(119,107));
		sections.add(points);
		line=new GuiLine(sections,OR_gropr.getOut(0));
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(111,269));
		points.add(new Point(120,269));
		sections.add(points);
		line=new GuiLine(sections,OR_l2_brnch.getOut(0));
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(111,335));
		points.add(new Point(119,335));
		sections.add(points);
		line=new GuiLine(sections,OR_l3_jump.getOut(0));
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(111,400));
		points.add(new Point(119,400));
		sections.add(points);
		line=new GuiLine(sections,OR_store.getOut(0));
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(353,107));
		points.add(new Point(360,107));
		sections.add(points);
		line=new GuiLine(sections,AND_gradr.getOut(0));
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(540,107));
		points.add(new Point(549,107));
		sections.add(points);
		line=new GuiLine(sections,OR_l1.getOut(0));
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(353,311));
		points.add(new Point(360,311));
		sections.add(points);
		line=new GuiLine(sections,AND_l2_arlog.getOut(0));
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(583,311));
		points.add(new Point(591,311));
		sections.add(points);
		line=new GuiLine(sections,AND_l3_arlog.getOut(0));
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(310,304));
		points.add(new Point(325,304));
		sections.add(points);
		line=new GuiLine(sections,OR_l2_arlog1.getOut(0));
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(310,411));
		points.add(new Point(318,411));
		points.add(new Point(318,317));
		points.add(new Point(325,317));
		sections.add(points);
		line=new GuiLine(sections,OR_l2_arlog2.getOut(0));
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(541,304));
		points.add(new Point(556,304));
		sections.add(points);
		line=new GuiLine(sections,OR_l3_arlog.getOut(0));
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(310,100));
		points.add(new Point(325,100));
		sections.add(points);
		line=new GuiLine(sections,OR_gradr.getOut(0));
		gui.addLine(line);

		//
		//
		// 
		// 
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(276,94));
		points.add(new Point(286,94));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.STB());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(276,107));
		points.add(new Point(286,107));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.STW());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(276,127));
		points.add(new Point(318,127));
		points.add(new Point(318,113));
		points.add(new Point(325,113));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.imm());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(506,10));
		points.add(new Point(514,10));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.GO_PG7());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(506,28));
		points.add(new Point(514,28));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.NOT());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(506,45));
		points.add(new Point(514,45));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.DEC());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(506,62));
		points.add(new Point(514,62));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.INC());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(507,81));
		points.add(new Point(514,81));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.GO_PG5());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(507,98));
		points.add(new Point(515,98));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.PUSHW());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(507,116));
		points.add(new Point(515,116));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.PUSHB());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(507,133));
		points.add(new Point(514,133));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.POPW());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(506,151));
		points.add(new Point(514,151));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.POPB());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(507,168));
		points.add(new Point(514,168));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.RTI());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(507,186));
		points.add(new Point(514,186));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.RTS());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(506,203));
		points.add(new Point(514,203));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.G0_PG0());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(77,251));
		points.add(new Point(84,251));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.GO_PG3());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(77,269));
		points.add(new Point(88,269));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.GO_PG2());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(77,286));
		points.add(new Point(84,286));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.INT());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(76,328));
		points.add(new Point(86,328));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.JSR());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(76,341));
		points.add(new Point(87,341));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.JMP());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(77,394));
		points.add(new Point(86,394));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.STB());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(77,407));
		points.add(new Point(86,407));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.STW());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(276,234));
		points.add(new Point(283,234));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.XOR());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(276,251));
		points.add(new Point(283,251));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.OR());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(276,269));
		points.add(new Point(283,269));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.AND());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(276,286));
		points.add(new Point(283,286));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.SUB());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(276,304));
		points.add(new Point(286,304));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.ADD());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(276,321));
		points.add(new Point(283,321));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.STW());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(275,339));
		points.add(new Point(283,339));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.STB());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(276,356));
		points.add(new Point(283,356));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.LDW());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(276,374));
		points.add(new Point(284,374));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.LDB());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(276,405));
		points.add(new Point(285,405));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.regdir());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(276,418));
		points.add(new Point(285,418));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.regind());
		gui.addLine(line);

		//
		//
		// 
		// 
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(507,251));
		points.add(new Point(514,251));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.XOR());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(506,269));
		points.add(new Point(514,269));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.OR());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(507,286));
		points.add(new Point(514,286));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.AND());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(507,304));
		points.add(new Point(517,304));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.SUB());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(507,321));
		points.add(new Point(514,321));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.ADD());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(507,339));
		points.add(new Point(514,339));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.STB());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(507,356));
		points.add(new Point(514,356));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.LDB());
		gui.addLine(line);

		//
		//
		sections=new ArrayList<ArrayList<Point>>();
		points=new ArrayList<Point>();
		points.add(new Point(507,385));
		points.add(new Point(548,385));
		points.add(new Point(548,317));
		points.add(new Point(556,317));
		sections.add(points);
		line=new GuiLine(sections,Fetch2.imm());
		gui.addLine(line);

		//
		//



		

	}
	/////////////
	/////////////
	/////////////
	
	public static void init() {
		
		OR_gropr = new OR(10);
		OR_gradr = new OR();
		AND_gradr = new AND();
		OR_l1 = new OR(12);
		OR_l2_brnch = new OR(3);
		OR_l3_jump = new OR();
		OR_store = new OR();
		OR_l2_arlog1 = new OR(9);
		OR_l2_arlog2 = new OR();
		AND_l2_arlog = new AND();
		OR_l3_arlog = new OR(7);
		AND_l3_arlog = new AND();
		
		not_gropr = new NOT();
		
		not_gradr = new NOT();

	}
	
	public static void connect() {
		
		OR_gropr.setInputPin(0, Fetch2.G0_PG0_2());
		OR_gropr.setInputPin(1, Fetch2.G0_PG0_3());
		OR_gropr.setInputPin(2, Fetch2.G0_PG1_0());
		OR_gropr.setInputPin(3, Fetch2.G0_PG1_6());
		OR_gropr.setInputPin(4, Fetch2.G0_PG1_7());
		OR_gropr.setInputPin(5, Fetch2.G0_PG5_6());
		OR_gropr.setInputPin(6, Fetch2.G0_PG5_7());
		OR_gropr.setInputPin(7, Fetch2.G1());
		OR_gropr.setInputPin(8, Fetch2.G2());
		OR_gropr.setInputPin(9, Fetch2.G3());
		
		OR_gradr.setInputPin(0, Fetch2.STB());
		OR_gradr.setInputPin(1, Fetch2.STW());
		
		AND_gradr.setInputPin(0, OR_gradr.getOut(0));
		AND_gradr.setInputPin(1, Fetch2.imm());
		
		OR_l1.setInputPin(0, Fetch2.G0_PG0());
		OR_l1.setInputPin(1, Fetch2.RTS());
		OR_l1.setInputPin(2, Fetch2.RTI());
		OR_l1.setInputPin(3, Fetch2.POPB());
		OR_l1.setInputPin(4, Fetch2.POPW());
		OR_l1.setInputPin(5, Fetch2.PUSHB());
		OR_l1.setInputPin(6, Fetch2.PUSHW());
		OR_l1.setInputPin(7, Fetch2.GO_PG5());
		OR_l1.setInputPin(8, Fetch2.INC());
		OR_l1.setInputPin(9, Fetch2.DEC());
		OR_l1.setInputPin(10, Fetch2.NOT());
		OR_l1.setInputPin(11, Fetch2.GO_PG7());
		
		OR_l2_brnch.setInputPin(0, Fetch2.GO_PG3());
		OR_l2_brnch.setInputPin(1, Fetch2.GO_PG2());
		OR_l2_brnch.setInputPin(2, Fetch2.INT());
		
		OR_l3_jump.setInputPin(0, Fetch2.JSR());
		OR_l3_jump.setInputPin(1, Fetch2.JMP());
		
		OR_store.setInputPin(0, Fetch2.STB());
		OR_store.setInputPin(1, Fetch2.STW());
		
		OR_l2_arlog1.setInputPin(0, Fetch2.XOR());
		OR_l2_arlog1.setInputPin(1, Fetch2.OR());
		OR_l2_arlog1.setInputPin(2, Fetch2.AND());
		OR_l2_arlog1.setInputPin(3, Fetch2.SUB());
		OR_l2_arlog1.setInputPin(4, Fetch2.ADD());
		OR_l2_arlog1.setInputPin(5, Fetch2.STW());
		OR_l2_arlog1.setInputPin(6, Fetch2.STB());
		OR_l2_arlog1.setInputPin(7, Fetch2.LDW());
		OR_l2_arlog1.setInputPin(8, Fetch2.LDB());

		OR_l2_arlog2.setInputPin(0, Fetch2.regdir());
		OR_l2_arlog2.setInputPin(1, Fetch2.regind());
		
		AND_l2_arlog.setInputPin(0, OR_l2_arlog1.getOut(0));
		AND_l2_arlog.setInputPin(1, OR_l2_arlog2.getOut(0));

		OR_l3_arlog.setInputPin(0, Fetch2.XOR());
		OR_l3_arlog.setInputPin(1, Fetch2.OR());
		OR_l3_arlog.setInputPin(2, Fetch2.AND());
		OR_l3_arlog.setInputPin(3, Fetch2.SUB());
		OR_l3_arlog.setInputPin(4, Fetch2.ADD());
		OR_l3_arlog.setInputPin(5, new Pin(false)); /// ILI.. OR_l3_arlog.setInputPin(5, new Pin(false) );
		OR_l3_arlog.setInputPin(6, Fetch2.LDB());
		
		AND_l3_arlog.setInputPin(0, OR_l3_arlog.getOut(0));
		AND_l3_arlog.setInputPin(1, Fetch2.imm());
		
		not_gropr.setInputPin(0, OR_gropr.getOut(0));
		not_gradr.setInputPin(0, AND_gradr.getOut(0));
		
	}
	
	public static void main(String[] args){
		
		Fetch3.init();
		
		
		OR_l1.setInputPin(0, new Pin(false));
		OR_l1.setInputPin(1, new Pin(false));
		OR_l1.setInputPin(2, new Pin(false));
		OR_l1.setInputPin(3, new Pin(false));
		OR_l1.setInputPin(4,new Pin(false));
		OR_l1.setInputPin(5, new Pin(false));
		OR_l1.setInputPin(6, new Pin(false));
		OR_l1.setInputPin(7, new Pin(false));
		OR_l1.setInputPin(8, new Pin(false));
		OR_l1.setInputPin(9, new Pin(false));
		OR_l1.setInputPin(10, new Pin(false));
		OR_l1.setInputPin(11, new Pin(false));

		OR_l1.func();
		
		System.out.println(OR_l1.getOut(0).getBoolVal());
		
	}

	public static Pin not_gropr() {
		return not_gropr.getOut(0);
	}
	
	public static Pin not_gradr() {
		return not_gradr.getOut(0);
	}
	
	public static Pin l1(){
		return OR_l1.getOut(0);
	}
	
	public static Pin l2_brnch(){
		return OR_l2_brnch.getOut(0);
	}
	
	public static Pin l2_arlog(){
		return AND_l2_arlog.getOut(0);
	}
	
	public static Pin l3_jump(){
		return OR_l3_jump.getOut(0);
	}
	
	public static Pin l3_arlog(){
		return AND_l3_arlog.getOut(0);
	}
	
	public static Pin store(){
		return OR_store.getOut(0);
	}
	
	
}

